﻿<%@ Page Language="C#" AutoEventWireup="false" EnableTheming="false" StylesheetTheme="" Theme="" CodeBehind="system.aspx.cs" Inherits="EPiServer.Util.javascript.system" %>
if (typeof(EPi) == "undefined" || EPi == null)
{
    EPi = {};
}
EPi.ResolveUrlFromUtil = function(url)
{
    return "<%=EPiServer.UriSupport.ResolveUrlFromUtilBySettings("")%>" + url;
}

<%  if (EPiServer.Security.PrincipalInfo.HasAdminAccess ||
        EPiServer.Security.PrincipalInfo.HasEditAccess ||
        EPiServer.Security.PrincipalInfo.HasEditorAccess) 
    {%>
EPi.ResolveUrlFromUI = function(url)
{
    return "<%=EPiServer.UriSupport.ResolveUrlFromUIBySettings("")%>" + url;
}
<%  }%>

EPi.Translations = 
{
    <%= TranslationJson("/util/editor/javascript/quote/noparentquote")%>,
    <%= TranslationJson("/javascript/system/popupsblocked")%>, 
    <%= TranslationJson("/system/editutil/leavepagewarning")%>, 
    <%= TranslationJson("/button/saveandpublish")%>, 
    <%= TranslationJson("/button/done")%>,
    <%= TranslationJson("/button/cancel")%>
}

EPi.Translate = function(key, fallback)
{
    var translation = EPi.Translations[key];
    return translation || fallback;
}

